home *** CD-ROM | disk | FTP | other *** search
/ PC Plus SuperCD (UK) 1998 August / PC Plus SuperCD 50a Issue 142 (CD142a) (August 1998).iso / trial / demon / TURNPIKE.1 / CLASSES.ZIP / JAVA / LANG / Float.class (.txt) < prev    next >
Encoding:
Java Class File  |  1997-04-14  |  1.4 KB  |  79 lines

  1. package java.lang;
  2.  
  3. public final class Float extends Number {
  4.    public static final float POSITIVE_INFINITY = InfinityF;
  5.    public static final float NEGATIVE_INFINITY = -InfinityF;
  6.    public static final float NaN = NaNF;
  7.    public static final float MAX_VALUE = 3.4028235E38F;
  8.    public static final float MIN_VALUE = 1.4E-45F;
  9.    private float value;
  10.  
  11.    public static native String toString(float var0);
  12.  
  13.    public static native Float valueOf(String var0) throws NumberFormatException;
  14.  
  15.    public static boolean isNaN(float var0) {
  16.       return var0 != var0;
  17.    }
  18.  
  19.    public static boolean isInfinite(float var0) {
  20.       return var0 == POSITIVE_INFINITY || var0 == NEGATIVE_INFINITY;
  21.    }
  22.  
  23.    public Float(float var1) {
  24.       this.value = var1;
  25.    }
  26.  
  27.    public Float(double var1) {
  28.       this.value = (float)var1;
  29.    }
  30.  
  31.    public Float(String var1) throws NumberFormatException {
  32.       Float var2 = valueOf(var1);
  33.       this(var2.value);
  34.    }
  35.  
  36.    public boolean isNaN() {
  37.       float var1 = this.value;
  38.       return var1 != var1;
  39.    }
  40.  
  41.    public boolean isInfinite() {
  42.       float var1 = this.value;
  43.       return var1 == POSITIVE_INFINITY || var1 == NEGATIVE_INFINITY;
  44.    }
  45.  
  46.    public String toString() {
  47.       float var1 = this.value;
  48.       return toString(var1);
  49.    }
  50.  
  51.    public int intValue() {
  52.       return (int)this.value;
  53.    }
  54.  
  55.    public long longValue() {
  56.       return (long)this.value;
  57.    }
  58.  
  59.    public float floatValue() {
  60.       return this.value;
  61.    }
  62.  
  63.    public double doubleValue() {
  64.       return (double)this.value;
  65.    }
  66.  
  67.    public int hashCode() {
  68.       return floatToIntBits(this.value);
  69.    }
  70.  
  71.    public boolean equals(Object var1) {
  72.       return var1 != null && var1 instanceof Float && floatToIntBits(((Float)var1).value) == floatToIntBits(this.value);
  73.    }
  74.  
  75.    public static native int floatToIntBits(float var0);
  76.  
  77.    public static native float intBitsToFloat(int var0);
  78. }
  79.